home *** CD-ROM | disk | FTP | other *** search
/ AOL File Library: 9,300 to 9,399 / 9300.zip / AOLDLs / Sightings Multimedia Tools / MAC_ Graphic Converter 2.0.6 / GraphicConverter 2.0.6 (US).sit / GraphicConverter 2.0.6 (US) / Plug-ins / Header.p next >
Text File  |  1994-12-13  |  3KB  |  118 lines

  1. unit Header;
  2.  
  3. interface
  4.  
  5.  
  6. { File type of an extension: PLUG }
  7. { Creator of an extension: GKON }
  8. {}
  9. { Definition of an import extension: }
  10. { STR# number 1024 index 1 contains the name }
  11. { STR# number 1024 index 2 contains the file type of the graphic files }
  12. { PLUG number 1024 contains the 68K code resource for the import extension }
  13. {}
  14. { Definition of an export extension: }
  15. { STR# number 2048 index 1 contains the name }
  16. { STR# number 2048 index 2 contains the file type of the graphic files }
  17. { PLUG number 2048 contains the 68K code resource for the export extension }
  18. {}
  19. { Definition of an filter extension: }
  20. { STR# number 4096 index contains the name }
  21. { PLUG number 4096 contains the 68K code resource for the filter extension }
  22. {}
  23. { One extension can contain the import and export resources }
  24.  
  25.     type
  26.         T_ColorTableArr = array[0..255] of RGBColor;
  27.         T_ColorTablePtr = ^T_ColorTableArr;
  28.  
  29.         T_ImportRec = record
  30.                 version: Longint; { 0 }
  31.  
  32.                 callKind: Longint; { 0 - all available, 1 - format was especially selected }
  33.  
  34.                 progressProcPtr: ptr; { nil, if not function available }
  35.                 progressType: Longint; { 0-68K, 1-PPC }
  36.  
  37.                 createVectorPict: Longint; { 0-no, 1-yes }
  38.                 vectorPictHdl: PicHandle;
  39.  
  40.                 srcDataHdl: Handle;
  41.                 srcDataSize: Longint;
  42.                 srcFile: FSSpec;
  43.  
  44.                 destDataHdl: Handle;
  45.                 destBitsPerPixel: Longint;
  46.                 destBytesPerLine: Longint;
  47.                 destWidth: Longint;
  48.                 destHeight: Longint;
  49.                 destDataSize: Longint; { in bytes }
  50.                 destColorTablePtr: T_ColorTablePtr; { preallocated for 256 colors, fill only the fields }
  51.                 destKindStr: str255;
  52.                 destFileType: ResType;
  53.  
  54.                 success: Longint; { 0 - no, 1 - yes }
  55.             end;
  56.         T_ImportPtr = ^T_ImportRec;
  57.  
  58.         T_ExportRec = record
  59.                 version: Longint; { 0 }
  60.  
  61.                 progressProcPtr: ptr;  { nil, if not function available }
  62.                 progressType: Longint; { 0-68K, 1-PPC }
  63.  
  64.                 srcDataPtr: ptr;
  65.                 srcBitsPerPixel: Longint;
  66.                 srcBytesPerLine: Longint;
  67.                 srcWidth: Longint;
  68.                 srcHeight: Longint;
  69.                 srcColorTablePtr: T_ColorTablePtr;
  70.                 srcDataSize: Longint; { in bytes }
  71.  
  72.                 destFSSpecRec: FSSpec;
  73.  
  74.                 success: Longint; { 0 - no, 1 - yes }
  75.             end;
  76.         T_ExportPtr = ^T_ExportRec;
  77.  
  78.         T_FilterRec = record
  79.                 version: Longint; { 0 }
  80.  
  81.                 progressProcPtr: ptr;  { nil, if not function available }
  82.                 progressType: Longint; { 0-68K, 1-PPC }
  83.  
  84.                 srcDataHdl: Handle; { don't free !!! }
  85.                 srcBitsPerPixel: Longint;
  86.                 srcBytesPerLine: Longint;
  87.                 srcWidth: Longint;
  88.                 srcHeight: Longint;
  89.                 srcColorTablePtr: T_ColorTablePtr;
  90.                 srcDataSize: Longint; { in bytes }
  91.  
  92.                 destDataHdl: Handle; { nil on entry }
  93.                 destBitsPerPixel: Longint;
  94.                 destBytesPerLine: Longint;
  95.                 destWidth: Longint;
  96.                 destHeight: LOngint;
  97.                 destColorTablePtr: T_ColorTablePtr;
  98.                 destDataSize: Longint; { in bytes }
  99.  
  100.     { if destDataHdl is nil on exit than the filter changes the srcData }
  101.  
  102.                 success: Longint; { 0 - no, 1 - yes }
  103.             end;
  104.         T_FilterPtr = ^T_FilterRec;
  105.  
  106.     const
  107.         C_SetTitle = 0;
  108.         C_InitProgressBar = 1;
  109.         C_SetProgressValue = 2;
  110.         C_ClearProgressBar = 3;
  111.  
  112. { prototype for progress function: }
  113. { procedure Progress(command:Longint; title:str255; percent:Longint);}
  114. { percent in the range 0..100 }
  115.  
  116. implementation
  117.  
  118. end.